using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DownloadVoiceResponse : GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>
		{
			private bool resultIsReadOnly;
			private DownloadVoiceResponse result;
			protected override DownloadVoiceResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DownloadVoiceResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DownloadVoiceResponse DefaultInstanceForType
			{
				get
				{
					return DownloadVoiceResponse.DefaultInstance;
				}
			}
			public uint MsgId
			{
				get
				{
					return this.result.MsgId;
				}
				set
				{
					this.SetMsgId(value);
				}
			}
			public uint Offset
			{
				get
				{
					return this.result.Offset;
				}
				set
				{
					this.SetOffset(value);
				}
			}
			public uint Length
			{
				get
				{
					return this.result.Length;
				}
				set
				{
					this.SetLength(value);
				}
			}
			public uint VoiceLength
			{
				get
				{
					return this.result.VoiceLength;
				}
				set
				{
					this.SetVoiceLength(value);
				}
			}
			public string ClientMsgId
			{
				get
				{
					return this.result.ClientMsgId;
				}
				set
				{
					this.SetClientMsgId(value);
				}
			}
			public SKBuiltinBuffer_t Data
			{
				get
				{
					return this.result.Data;
				}
				set
				{
					this.SetData(value);
				}
			}
			public uint EndFlag
			{
				get
				{
					return this.result.EndFlag;
				}
				set
				{
					this.SetEndFlag(value);
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint CancelFlag
			{
				get
				{
					return this.result.CancelFlag;
				}
				set
				{
					this.SetCancelFlag(value);
				}
			}
			public Builder()
			{
				this.result = DownloadVoiceResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DownloadVoiceResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DownloadVoiceResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DownloadVoiceResponse other = this.result;
					this.result = new DownloadVoiceResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DownloadVoiceResponse.Builder Clear()
			{
				this.result = DownloadVoiceResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DownloadVoiceResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DownloadVoiceResponse.Builder(this.result);
				}
				return new DownloadVoiceResponse.Builder().MergeFrom(this.result);
			}
			public override DownloadVoiceResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DownloadVoiceResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is DownloadVoiceResponse)
				{
					return this.MergeFrom((DownloadVoiceResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DownloadVoiceResponse.Builder MergeFrom(DownloadVoiceResponse other)
			{
				return this;
			}
			public override DownloadVoiceResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DownloadVoiceResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DownloadVoiceResponse._downloadVoiceResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DownloadVoiceResponse._downloadVoiceResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 40u)
					{
						if (num3 <= 8u)
						{
							if (num3 == 0u)
							{
								throw InvalidProtocolBufferException.InvalidTag();
							}
							if (num3 == 8u)
							{
								this.result.hasMsgId = input.ReadUInt32(ref this.result.msgId_);
								continue;
							}
						}
						else
						{
							if (num3 == 16u)
							{
								this.result.hasOffset = input.ReadUInt32(ref this.result.offset_);
								continue;
							}
							if (num3 == 24u)
							{
								this.result.hasLength = input.ReadUInt32(ref this.result.length_);
								continue;
							}
							if (num3 == 40u)
							{
								this.result.hasVoiceLength = input.ReadUInt32(ref this.result.voiceLength_);
								continue;
							}
						}
					}
					else
					{
						if (num3 <= 58u)
						{
							if (num3 == 50u)
							{
								this.result.hasClientMsgId = input.ReadString(ref this.result.clientMsgId_);
								continue;
							}
							if (num3 == 58u)
							{
								SKBuiltinBuffer_t.Builder builder = SKBuiltinBuffer_t.CreateBuilder();
								if (this.result.hasData)
								{
									builder.MergeFrom(this.Data);
								}
								input.ReadMessage(builder, extensionRegistry);
								this.Data = builder.BuildPartial();
								continue;
							}
						}
						else
						{
							if (num3 == 64u)
							{
								this.result.hasEndFlag = input.ReadUInt32(ref this.result.endFlag_);
								continue;
							}
							if (num3 == 74u)
							{
								BaseResponse.Builder builder2 = BaseResponse.CreateBuilder();
								if (this.result.hasBaseResponse)
								{
									builder2.MergeFrom(this.BaseResponse);
								}
								input.ReadMessage(builder2, extensionRegistry);
								this.BaseResponse = builder2.BuildPartial();
								continue;
							}
							if (num3 == 80u)
							{
								this.result.hasCancelFlag = input.ReadUInt32(ref this.result.cancelFlag_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public DownloadVoiceResponse.Builder SetMsgId(uint value)
			{
				this.PrepareBuilder();
				this.result.hasMsgId = true;
				this.result.msgId_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearMsgId()
			{
				this.PrepareBuilder();
				this.result.hasMsgId = false;
				this.result.msgId_ = 0u;
				return this;
			}
			public DownloadVoiceResponse.Builder SetOffset(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOffset = true;
				this.result.offset_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearOffset()
			{
				this.PrepareBuilder();
				this.result.hasOffset = false;
				this.result.offset_ = 0u;
				return this;
			}
			public DownloadVoiceResponse.Builder SetLength(uint value)
			{
				this.PrepareBuilder();
				this.result.hasLength = true;
				this.result.length_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearLength()
			{
				this.PrepareBuilder();
				this.result.hasLength = false;
				this.result.length_ = 0u;
				return this;
			}
			public DownloadVoiceResponse.Builder SetVoiceLength(uint value)
			{
				this.PrepareBuilder();
				this.result.hasVoiceLength = true;
				this.result.voiceLength_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearVoiceLength()
			{
				this.PrepareBuilder();
				this.result.hasVoiceLength = false;
				this.result.voiceLength_ = 0u;
				return this;
			}
			public DownloadVoiceResponse.Builder SetClientMsgId(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasClientMsgId = true;
				this.result.clientMsgId_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearClientMsgId()
			{
				this.PrepareBuilder();
				this.result.hasClientMsgId = false;
				this.result.clientMsgId_ = "";
				return this;
			}
			public DownloadVoiceResponse.Builder SetData(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasData = true;
				this.result.data_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder SetData(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasData = true;
				this.result.data_ = builderForValue.Build();
				return this;
			}
			public DownloadVoiceResponse.Builder MergeData(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasData && this.result.data_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.data_ = SKBuiltinBuffer_t.CreateBuilder(this.result.data_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.data_ = value;
				}
				this.result.hasData = true;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearData()
			{
				this.PrepareBuilder();
				this.result.hasData = false;
				this.result.data_ = null;
				return this;
			}
			public DownloadVoiceResponse.Builder SetEndFlag(uint value)
			{
				this.PrepareBuilder();
				this.result.hasEndFlag = true;
				this.result.endFlag_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearEndFlag()
			{
				this.PrepareBuilder();
				this.result.hasEndFlag = false;
				this.result.endFlag_ = 0u;
				return this;
			}
			public DownloadVoiceResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public DownloadVoiceResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public DownloadVoiceResponse.Builder SetCancelFlag(uint value)
			{
				this.PrepareBuilder();
				this.result.hasCancelFlag = true;
				this.result.cancelFlag_ = value;
				return this;
			}
			public DownloadVoiceResponse.Builder ClearCancelFlag()
			{
				this.PrepareBuilder();
				this.result.hasCancelFlag = false;
				this.result.cancelFlag_ = 0u;
				return this;
			}
		}
		public const int MsgIdFieldNumber = 1;
		public const int OffsetFieldNumber = 2;
		public const int LengthFieldNumber = 3;
		public const int VoiceLengthFieldNumber = 5;
		public const int ClientMsgIdFieldNumber = 6;
		public const int DataFieldNumber = 7;
		public const int EndFlagFieldNumber = 8;
		public const int BaseResponseFieldNumber = 9;
		public const int CancelFlagFieldNumber = 10;
		private static readonly DownloadVoiceResponse defaultInstance;
		private static readonly string[] _downloadVoiceResponseFieldNames;
		private static readonly uint[] _downloadVoiceResponseFieldTags;
		private bool hasMsgId;
		private uint msgId_;
		private bool hasOffset;
		private uint offset_;
		private bool hasLength;
		private uint length_;
		private bool hasVoiceLength;
		private uint voiceLength_;
		private bool hasClientMsgId;
		private string clientMsgId_ = "";
		private bool hasData;
		private SKBuiltinBuffer_t data_;
		private bool hasEndFlag;
		private uint endFlag_;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasCancelFlag;
		private uint cancelFlag_;
		private int memoizedSerializedSize = -1;
		public static DownloadVoiceResponse DefaultInstance
		{
			get
			{
				return DownloadVoiceResponse.defaultInstance;
			}
		}
		public override DownloadVoiceResponse DefaultInstanceForType
		{
			get
			{
				return DownloadVoiceResponse.DefaultInstance;
			}
		}
		protected override DownloadVoiceResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint MsgId
		{
			get
			{
				return this.msgId_;
			}
		}
		public uint Offset
		{
			get
			{
				return this.offset_;
			}
		}
		public uint Length
		{
			get
			{
				return this.length_;
			}
		}
		public uint VoiceLength
		{
			get
			{
				return this.voiceLength_;
			}
		}
		public string ClientMsgId
		{
			get
			{
				return this.clientMsgId_;
			}
		}
		public SKBuiltinBuffer_t Data
		{
			get
			{
				return this.data_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public uint EndFlag
		{
			get
			{
				return this.endFlag_;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint CancelFlag
		{
			get
			{
				return this.cancelFlag_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasMsgId && this.hasOffset && this.hasLength && this.hasVoiceLength && this.hasData && this.hasEndFlag && this.hasBaseResponse && this.Data.IsInitialized && this.BaseResponse.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasMsgId)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.MsgId);
				}
				if (this.hasOffset)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Offset);
				}
				if (this.hasLength)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.Length);
				}
				if (this.hasVoiceLength)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.VoiceLength);
				}
				if (this.hasClientMsgId)
				{
					num += CodedOutputStream.ComputeStringSize(6, this.ClientMsgId);
				}
				if (this.hasData)
				{
					num += CodedOutputStream.ComputeMessageSize(7, this.Data);
				}
				if (this.hasEndFlag)
				{
					num += CodedOutputStream.ComputeUInt32Size(8, this.EndFlag);
				}
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(9, this.BaseResponse);
				}
				if (this.hasCancelFlag)
				{
					num += CodedOutputStream.ComputeUInt32Size(10, this.CancelFlag);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DownloadVoiceResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] downloadVoiceResponseFieldNames = DownloadVoiceResponse._downloadVoiceResponseFieldNames;
			if (this.hasMsgId)
			{
				output.WriteUInt32(1, downloadVoiceResponseFieldNames[6], this.MsgId);
			}
			if (this.hasOffset)
			{
				output.WriteUInt32(2, downloadVoiceResponseFieldNames[7], this.Offset);
			}
			if (this.hasLength)
			{
				output.WriteUInt32(3, downloadVoiceResponseFieldNames[5], this.Length);
			}
			if (this.hasVoiceLength)
			{
				output.WriteUInt32(5, downloadVoiceResponseFieldNames[8], this.VoiceLength);
			}
			if (this.hasClientMsgId)
			{
				output.WriteString(6, downloadVoiceResponseFieldNames[2], this.ClientMsgId);
			}
			if (this.hasData)
			{
				output.WriteMessage(7, downloadVoiceResponseFieldNames[3], this.Data);
			}
			if (this.hasEndFlag)
			{
				output.WriteUInt32(8, downloadVoiceResponseFieldNames[4], this.EndFlag);
			}
			if (this.hasBaseResponse)
			{
				output.WriteMessage(9, downloadVoiceResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasCancelFlag)
			{
				output.WriteUInt32(10, downloadVoiceResponseFieldNames[1], this.CancelFlag);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasMsgId)
			{
				num ^= this.msgId_.GetHashCode();
			}
			if (this.hasOffset)
			{
				num ^= this.offset_.GetHashCode();
			}
			if (this.hasLength)
			{
				num ^= this.length_.GetHashCode();
			}
			if (this.hasVoiceLength)
			{
				num ^= this.voiceLength_.GetHashCode();
			}
			if (this.hasClientMsgId)
			{
				num ^= this.clientMsgId_.GetHashCode();
			}
			if (this.hasData)
			{
				num ^= this.data_.GetHashCode();
			}
			if (this.hasEndFlag)
			{
				num ^= this.endFlag_.GetHashCode();
			}
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasCancelFlag)
			{
				num ^= this.cancelFlag_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			DownloadVoiceResponse downloadVoiceResponse = object_0 as DownloadVoiceResponse;
			return downloadVoiceResponse != null && (this.hasMsgId == downloadVoiceResponse.hasMsgId && (!this.hasMsgId || this.msgId_.Equals(downloadVoiceResponse.msgId_))) && (this.hasOffset == downloadVoiceResponse.hasOffset && (!this.hasOffset || this.offset_.Equals(downloadVoiceResponse.offset_))) && (this.hasLength == downloadVoiceResponse.hasLength && (!this.hasLength || this.length_.Equals(downloadVoiceResponse.length_))) && (this.hasVoiceLength == downloadVoiceResponse.hasVoiceLength && (!this.hasVoiceLength || this.voiceLength_.Equals(downloadVoiceResponse.voiceLength_))) && (this.hasClientMsgId == downloadVoiceResponse.hasClientMsgId && (!this.hasClientMsgId || this.clientMsgId_.Equals(downloadVoiceResponse.clientMsgId_))) && (this.hasData == downloadVoiceResponse.hasData && (!this.hasData || this.data_.Equals(downloadVoiceResponse.data_))) && (this.hasEndFlag == downloadVoiceResponse.hasEndFlag && (!this.hasEndFlag || this.endFlag_.Equals(downloadVoiceResponse.endFlag_))) && (this.hasBaseResponse == downloadVoiceResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(downloadVoiceResponse.baseResponse_))) && (this.hasCancelFlag == downloadVoiceResponse.hasCancelFlag && (!this.hasCancelFlag || this.cancelFlag_.Equals(downloadVoiceResponse.cancelFlag_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("MsgId", this.hasMsgId, this.msgId_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("Offset", this.hasOffset, this.offset_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("Length", this.hasLength, this.length_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("VoiceLength", this.hasVoiceLength, this.voiceLength_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("ClientMsgId", this.hasClientMsgId, this.clientMsgId_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("Data", this.hasData, this.data_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("EndFlag", this.hasEndFlag, this.endFlag_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<DownloadVoiceResponse, DownloadVoiceResponse.Builder>.PrintField("CancelFlag", this.hasCancelFlag, this.cancelFlag_, writer);
		}
		public static DownloadVoiceResponse ParseFrom(byte[] data)
		{
			return DownloadVoiceResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DownloadVoiceResponse MakeReadOnly()
		{
			return this;
		}
		public static DownloadVoiceResponse.Builder CreateBuilder()
		{
			return new DownloadVoiceResponse.Builder();
		}
		public override DownloadVoiceResponse.Builder ToBuilder()
		{
			return DownloadVoiceResponse.CreateBuilder(this);
		}
		public override DownloadVoiceResponse.Builder CreateBuilderForType()
		{
			return new DownloadVoiceResponse.Builder();
		}
		public static DownloadVoiceResponse.Builder CreateBuilder(DownloadVoiceResponse prototype)
		{
			return new DownloadVoiceResponse.Builder(prototype);
		}
		static DownloadVoiceResponse()
		{
			DownloadVoiceResponse.defaultInstance = new DownloadVoiceResponse().MakeReadOnly();
			DownloadVoiceResponse._downloadVoiceResponseFieldNames = new string[]
			{
				"BaseResponse",
				"CancelFlag",
				"ClientMsgId",
				"Data",
				"EndFlag",
				"Length",
				"MsgId",
				"Offset",
				"VoiceLength"
			};
			DownloadVoiceResponse._downloadVoiceResponseFieldTags = new uint[]
			{
				74u,
				80u,
				50u,
				58u,
				64u,
				24u,
				8u,
				16u,
				40u
			};
			object.ReferenceEquals(micromsg.Proto.DownloadVoiceResponse.Descriptor, null);
		}
	}
}
